<?php

namespace Modules\Admin\Http\Controllers\Trash;

use Modules\Common\Models\Helpers\TrashManager;
use Modules\Common\Models\Trash;
use Modules\Common\Util\Api;


class Recover
{


    /**
     * @Route(path=/api/admin/trash/recover  method=put)
     */
    public function index()
    {
        Api::validate(['trash_id' => 'integer|exists:trashes,id']);
        TrashManager::recover(Trash::find(request('trash_id')));
        return Api::success();
    }


}
